-- GENERATED SPELL FOR [Yulda the Stormspeaker] --


function spell0_30046(pUnit, Event) --@Call Lightning,n/a--
pUnit:FullCastSpellOnTarget(32018,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30046', 525, 1)
end

function spell1_30046(pUnit, Event) --@Typhoon,n/a--
pUnit:FullCastSpellOnTarget(55087,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30046', 603, 1)
end

function Sorts_30046(pUnit, Event)
local choix_sorts_30046 = math.random(0, 1)
if choix_sorts_30046 == 0 then
pUnit:RegisterEvent('spell0_30046', 1, 1)
end
if choix_sorts_30046 == 1 then
pUnit:RegisterEvent('spell1_30046', 1, 1)
end
end

function mob30046_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30046', math.random(1500, 3000), 1)
end

function mob30046_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30046_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30046_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30046, 1, 'mob30046_Action')
RegisterUnitEvent(30046, 2, 'mob30046_Leave')
RegisterUnitEvent(30046, 3, 'mob30046_Kill')
RegisterUnitEvent(30046, 4, 'mob30046_Die')
